package per.sunmes.cl.g.sys;

import java.util.HashMap;
import java.util.Map;

import per.sunmes.cl.g.gsys.GameActor;

import com.badlogic.gdx.assets.AssetManager;
import com.badlogic.gdx.assets.loaders.FileHandleResolver;
import com.badlogic.gdx.backends.lwjgl.LwjglApplication;
import com.badlogic.gdx.scenes.scene2d.Stage;
import com.badlogic.gdx.utils.Disposable;

public class G {

	public static Stage stage;
	public static int width, height;

	public static GameActor gameActor;

	public static AssetManager asset;
	public static FileHandleResolver fileResolver;
	public static LwjglApplication application;
	public static int frameRate;

	public static final Map<String, Disposable> caches = new HashMap<String, Disposable>();

	public static void addCache(String name, Disposable disp) {
		if (caches.containsKey(name)) {
			throw new RuntimeException("Repeat name cache at caches!");
		}
		caches.put(name, disp);
	}

	public static Disposable getCache(String name) {
		return caches.get(name);
	}

}
